package com.yimi.yinhepda.views.dispatch_module;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import com.pda.ym.base.BaseActivity;
import com.yimi.yinhepda.R;

/**
 * 配送管理界面
 *
 * @author 000432
 * @date 2018/3/7 0007
 */
public class DispatchManageActivity extends BaseActivity {

  @Override public String getPageName() {
    return "配送管理";
  }

  @Override protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_dispatch_manage);

    ((TextView) findViewById(R.id.title)).setText("配送管理");
    findViewById(R.id.num).setVisibility(View.INVISIBLE);
    findViewById(R.id.dispatch_manage_list).setOnClickListener(this);
    findViewById(R.id.dispatch_manage_back_scan).setOnClickListener(this);
    findViewById(R.id.dispatch_manage_back_btn).setOnClickListener(this);
  }

  @Override public void onClick(View v) {
    super.onClick(v);
    switch (v.getId()) {
      case R.id.dispatch_manage_list:
        //集中派送
        toActivity(DispatchTaskActivity.class);
        break;
      case R.id.dispatch_manage_back_scan:
        //if (true) {
        //  showToast("该功能暂未开放");
        //  return;
        //}
        //配送退单扫描
        toActivity(DispatchBackScanActivity.class);
        break;
      case R.id.dispatch_manage_back_btn:
        finish();
        break;
      default:
        break;
    }
  }
}
